The final output all_stocks_fundamental_analysis.json.gz contains 86 fields per stock across 2,775 stocks , organized into 13 logical categories. This page documents every field, its data type, calculation method, and source.
Overview
File Size : ~7.5 MB compressed (38 MB uncompressed)Format : JSON array of objects (gzipped)
Field Categories
Identity (6)
Fundamentals (37)
Valuation (7)
Ownership (4)
Performance (6)
Technical (6)
Volatility (11)
Historical (3)
Earnings (3)
F&O (3)
Circuit (1)
Events (3)
1. Identity & Classification Basic identifying information and classification for each stock. Field Type Source Description Example Symbol String master_isin_map.jsonStock ticker symbol "RELIANCE"Name String fundamental_data.jsonFull company name "Reliance Industries Limited"Listing Date String nse_equity_list.csvDate stock was listed on NSE "29-NOV-1977"Basic Industry String fundamental_data.json → CV.INDUSTRY_NAMEIndustry classification "Refineries"Sector String fundamental_data.json → CV.SECTORSector classification "Energy"Index String dhan_data_response.json → idxlistComma-separated list of indices "NIFTY 50, NIFTY 100"
The pipeline filters for 37 specific index IDs: requested_indices = {
13 , # NIFTY 50
51 , # NIFTY BANK
38 , # NIFTY IT
17 , # NIFTY NEXT 50
# ... (33 more indices)
}
indices_found = []
for idx_obj in tech[ 'idxlist' ]:
if idx_obj[ 'Indexid' ] in requested_indices:
indices_found.append(idx_obj[ 'Name' ])
stock[ 'Index' ] = ", " .join(indices_found)
If a stock is not part of any tracked index, this field shows "N/A". 2. Fundamentals (Quarterly Data) Financial performance metrics from quarterly results. All pipe-delimited values (|) are parsed from fundamental_data.json. Net Profit (5 fields + 2 growth) Field Type Calculation Example Latest Quarter String incomeStat_cq.YEAR (first value)"Dec-2023"Net Profit Latest Quarter Float incomeStat_cq.NET_PROFIT (index 0)18500.0Net Profit Previous Quarter Float incomeStat_cq.NET_PROFIT (index 1)17600.0Net Profit 2 Quarters Back Float incomeStat_cq.NET_PROFIT (index 2)16800.0Net Profit 3 Quarters Back Float incomeStat_cq.NET_PROFIT (index 3)16200.0Net Profit Last Year Quarter Float incomeStat_cq.NET_PROFIT (index 4)16500.0QoQ % Net Profit Latest Float `((Latest - Previous) / Previous ) × 100` 5.11YoY % Net Profit Latest Float `((Latest - LastYr) / LastYr ) × 100` 12.12
EPS (7 fields + 2 growth) Field Type Calculation Example EPS Latest Quarter Float incomeStat_cq.EPS (index 0)12.5EPS Previous Quarter Float incomeStat_cq.EPS (index 1)11.8EPS 2 Quarters Back Float incomeStat_cq.EPS (index 2)11.2EPS 3 Quarters Back Float incomeStat_cq.EPS (index 3)10.8EPS Last Year Quarter Float incomeStat_cq.EPS (index 4)11.0EPS Last Year Float incomeStat_cy.EPS (index 0) - Annual45.2EPS 2 Years Back Float incomeStat_cy.EPS (index 1) - Annual38.5QoQ % EPS Latest Float `((Latest - Previous) / Previous ) × 100` 5.93YoY % EPS Latest Float `((Latest - LastYr) / LastYr ) × 100` 13.64
Sales (6 fields + 2 growth + 5yr CAGR) Field Type Calculation Example Sales Latest Quarter Float incomeStat_cq.SALES (index 0)185000.0Sales Previous Quarter Float incomeStat_cq.SALES (index 1)178000.0Sales 2 Quarters Back Float incomeStat_cq.SALES (index 2)172000.0Sales 3 Quarters Back Float incomeStat_cq.SALES (index 3)168000.0Sales Last Year Quarter Float incomeStat_cq.SALES (index 4)165000.0QoQ % Sales Latest Float `((Latest - Previous) / Previous ) × 100` 3.93YoY % Sales Latest Float `((Latest - LastYr) / LastYr ) × 100` 12.12Sales Growth 5 Years(%) Float ((Current_Annual / 5Yr_Ago)^(1/5) - 1) × 1008.7
5-Year Sales CAGR Formula
OPM (Operating Profit Margin) (6 fields + 2 growth + TTM) Field Type Calculation Example OPM Latest Quarter Float incomeStat_cq.OPM (index 0)11.5OPM Previous Quarter Float incomeStat_cq.OPM (index 1)11.2OPM 2 Quarters Back Float incomeStat_cq.OPM (index 2)10.8OPM 3 Quarters Back Float incomeStat_cq.OPM (index 3)10.5OPM Last Year Quarter Float incomeStat_cq.OPM (index 4)10.2OPM TTM(%) Float TTM_cy.OPM - Trailing Twelve Months11.0QoQ % OPM Latest Float `((Latest - Previous) / Previous ) × 100` 2.68YoY % OPM Latest Float `((Latest - LastYr) / LastYr ) × 100` 12.75
Financial Ratios (4 fields) Field Type Calculation Example ROE(%) Float roce_roe.ROE15.2ROCE(%) Float roce_roe.ROCE12.8D/E Float bs_c.NON_CURRENT_LIABILITIES[0] / bs_c.TOTAL_EQUITY[0]0.45
non_current_liab = bs_c[ 'NON_CURRENT_LIABILITIES' ].split( '|' )[ 0 ]
total_equity = bs_c[ 'TOTAL_EQUITY' ].split( '|' )[ 0 ]
de_ratio = float (non_current_liab) / float (total_equity) if total_equity != 0 else 0.0
This uses the most recent balance sheet data (index 0). 3. Valuation Ratios Market valuation metrics. Field Type Calculation Example Market Cap(Cr.) Float CV.MARKET_CAP1700000.0Stock Price(₹) Float dhan_data_response.Ltp2540.75P/E Float CV.STOCK_PE28.5Forward P/E Float P/E × (TTM_EPS / Annualized_Latest_EPS)26.2Historical P/E 5 Float Reserved (currently 0.0) 0.0PEG Float P/E / YoY_EPS_Growth2.31% from 52W High Float ((LTP - High_52W) / High_52W) × 100-8.5
if eps_latest > 0 and pe > 0 :
annualized_eps = eps_latest * 4 # Quarterly to annual
ttm_eps = TTM_cy [ 'EPS' ]
if annualized_eps > 0 :
forward_pe = pe * (ttm_eps / annualized_eps)
This estimates the P/E based on annualized latest quarter EPS vs. TTM EPS.
if yoy_eps > 0 and pe > 0 :
peg = pe / yoy_eps
Example :
P/E = 28.5
YoY EPS Growth = 12.3%
PEG = 28.5 / 12.3 = 2.32
Interpretation :
PEG < 1: Potentially undervalued
PEG > 1: Potentially overvalued
4. Ownership & Float Shareholding pattern changes and free float availability. Field Type Calculation Example FII % change QoQ Float sHp.FII[0] - sHp.FII[1]1.2DII % change QoQ Float sHp.DII[0] - sHp.DII[1]-0.5Free Float(%) Float 100 - sHp.PROMOTER[0]49.5Float Shares(Cr.) Float (Market_Cap / LTP) × (Free_Float / 100)336.5
if mcap_cr > 0 and ltp > 0 :
total_shares_cr = mcap_cr / ltp
float_shares_cr = total_shares_cr * (free_float_pct / 100.0 )
Example (Reliance):
Market Cap = ₹17,00,000 Cr
LTP = ₹2,540.75
Total Shares = 17,00,000 / 2,540.75 = 669.04 Cr
Free Float % = 49.5%
Float Shares = 669.04 × 0.495 = 331.17 Cr
Historical return percentages over various time periods. Field Type Source Example 1 Day Returns(%) Float dhan_data_response.PPerchange0.81 Week Returns(%) Float dhan_data_response.PricePerchng1week2.51 Month Returns(%) Float dhan_data_response.PricePerchng1mon4.23 Month Returns(%) Float dhan_data_response.PricePerchng3mon8.56 Month Returns(%) Float Calculated from ohlcv_data/ (~126 days back) 15.31 Year Returns(%) Float dhan_data_response.PricePerchng1year28.7
6 Month Returns Calculation
# From advanced_metrics_processor.py
price_6m_ago = df[ 'Close' ].iloc[ - 126 ] if len (df) >= 126 else df[ 'Close' ].iloc[ 0 ]
returns_6m = ((latest_close - price_6m_ago) / price_6m_ago) * 100
Uses OHLCV data to calculate exact 6-month (126 trading days) return. 6. Technical Indicators Technical analysis signals and levels. Field Type Source/Calculation Example RSI (14) Float dhan_data_response.DayRSI14CurrentCandle62.5SMA Status String Parsed from advanced_indicator_data.SMA "SMA 20: Above (4.9%) | SMA 50: Above (24.1%)"EMA Status String Parsed from advanced_indicator_data.EMA "EMA 20: Above (6.3%) | EMA 200: Above (72.6%)"Technical Sentiment String Parsed from advanced_indicator_data.TechnicalIndicators "RSI: Neutral | MACD: Bearish"Pivot Point String advanced_indicator_data.Pivots[0].Classic.PP"2485.50"Gap Up % Float ((Open - Prev_Close) / Prev_Close) × 100 from OHLCV0.3
# From bulk_market_analyzer.py
target_smas = [ "20" , "50" , "200" ]
sma_signals = []
for s in advanced_indicator_data[ 'SMA' ]:
ind_name = s[ 'Indicator' ].replace( "-SMA" , "" ) # "20-SMA" → "20"
val = float (s[ 'Value' ])
if ind_name in target_smas and val > 0 and ltp > 0 :
diff = ((ltp - val) / val) * 100
status = "Above" if diff > 0 else "Below"
sma_signals.append( f "SMA { ind_name } : { status } ( { round (diff, 1 ) } %)" )
stock[ 'SMA Status' ] = " | " .join(sma_signals)
Example Output :
Price: ₹2,540.75
SMA 20: ₹2,420 → “Above (4.9%)”
SMA 50: ₹2,050 → “Above (24.1%)”
Result: "SMA 20: Above (4.9%) | SMA 50: Above (24.1%)"
Technical Sentiment Parsing
tech_inds = advanced_indicator_data[ 'TechnicalIndicators' ]
sentiment_summary = []
for t in tech_inds:
name = t[ 'Indicator' ]
action = t[ 'Action' ] # "Bullish", "Bearish", "Neutral"
if "RSI" in name:
sentiment_summary.append( f "RSI: { action } " )
elif "MACD" in name:
sentiment_summary.append( f "MACD: { action } " )
stock[ 'Technical Sentiment' ] = " | " .join(sentiment_summary)
7. Volatility & Volume Volatility metrics (ADR) and volume analysis. All calculated from ohlcv_data/{SYMBOL}.csv. Average Daily Range (ADR) Field Type Calculation Example 5 Days MA ADR(%) Float mean((High - Low) / Low × 100) last 5 days2.114 Days MA ADR(%) Float mean((High - Low) / Low × 100) last 14 days2.320 Days MA ADR(%) Float mean((High - Low) / Low × 100) last 20 days2.430 Days MA ADR(%) Float mean((High - Low) / Low × 100) last 30 days2.5Day Range(%) Float ((High - Low) / Low) × 100 for latest day1.8
# From advanced_metrics_processor.py
df[ 'Daily_Range_Pct' ] = ((df[ 'High' ] - df[ 'Low' ]) / df[ 'Low' ]) * 100
adr_5 = df[ 'Daily_Range_Pct' ].tail( 5 ).mean()
adr_14 = df[ 'Daily_Range_Pct' ].tail( 14 ).mean()
adr_20 = df[ 'Daily_Range_Pct' ].tail( 20 ).mean()
adr_30 = df[ 'Daily_Range_Pct' ].tail( 30 ).mean()
Use Case : Helps identify volatility patterns and potential breakout candidates.Volume Metrics Field Type Calculation Example RVOL Float Latest_Volume / Avg_Volume_20_Days1.25200 Days EMA Volume Float EMA(Volume, 200) latest value8500000% from 52W High 200 Days EMA Volume Float ((Latest_EMA - 52W_High_EMA) / 52W_High_EMA) × 100-15.2Daily Rupee Turnover 20(Cr.) Float mean(Close × Volume / 10M) last 20 days1250Daily Rupee Turnover 50(Cr.) Float mean(Close × Volume / 10M) last 50 days1180Daily Rupee Turnover 100(Cr.) Float mean(Close × Volume / 10M) last 100 days115030 Days Average Rupee Volume(Cr.) Float mean(Close × Volume / 10M) last 30 days1200
avg_vol_20 = df[ 'Volume' ].tail( 21 ).iloc[: - 1 ].mean() # Exclude latest day
rvol = latest_volume / avg_vol_20 if avg_vol_20 > 0 else 0
Interpretation :
RVOL > 1.5: Unusually high volume (potential breakout)
RVOL < 0.5: Low volume (potential consolidation)
RVOL ≈ 1.0: Normal volume
df[ 'Turnover_Cr' ] = (df[ 'Close' ] * df[ 'Volume' ]) / 10000000
turnover_20 = df[ 'Turnover_Cr' ].tail( 20 ).mean()
turnover_50 = df[ 'Turnover_Cr' ].tail( 50 ).mean()
turnover_100 = df[ 'Turnover_Cr' ].tail( 100 ).mean()
Note : Turnover is in Crores (₹10 Million units).8. Historical Price Metrics All-time and 52-week benchmarks from OHLCV data. Field Type Calculation Example ATH Float max(High) across all history2975.50% from ATH Float ((ATH - Latest_Close) / ATH) × 100-14.6% from 52W Low Float ((Latest_Close - Low_52W) / Low_52W) × 10035.8
# All-Time High
ath = df[ 'High' ].max() # Across entire OHLCV history
pct_from_ath = ((ath - latest_close) / ath) * 100
# 52-Week Low
low_52w = df[ 'Low' ].tail( 252 ).min() # ~252 trading days = 1 year
pct_from_52w_low = ((latest_close - low_52w) / low_52w) * 100
Use Cases :
ATH : Identify stocks near all-time highs (momentum)
52W Low : Find stocks recovering from lows (reversal)
9. Earnings Tracking Post-earnings price performance metrics. Field Type Calculation Example Quarterly Results Date String Latest “Quarterly Results” filing from company_filings/ "15-Jan-2024"Returns since Earnings(%) Float ((Current_Price - Results_Day_Close) / Results_Day_Close) × 1003.5Max Returns since Earnings(%) Float ((Max_Price_Since - Results_Day_Close) / Results_Day_Close) × 1008.2
Earnings Performance Calculation
10. F&O Data Futures & Options availability and contract details. Field Type Source Example FNO Flag String enrich_fno_data.py checks if symbol in F&O list"Yes" or "No"Lot Size Integer fno_lot_sizes_cleaned.json lookup250Next Expiry String fno_expiry_calendar.json lookup"28-Mar-2024"
If FNO Flag = "No", the Lot Size and Next Expiry fields will be empty or show default values.
11. Circuit & Price Bands Current price movement limits. Field Type Source Example Circuit Limit String complete_price_bands.json lookup"20%", "10%", "5%"
Common Circuit Limits :
"20%": Standard for most liquid stocks
"10%": Stocks with lower liquidity
"5%": Stocks under surveillance or with very low liquidity
"2%": Stocks under ASM/GSM (Additional Surveillance Measure)
Source : NSE’s daily price band file parsed by fetch_complete_price_bands.py12. Event Markers Array of icons/labels indicating recent or upcoming events. Field Type Source Example Event Markers Array[String] Aggregated from multiple sources ["📊: Results Recently Out", "💸: Dividend (15-Mar)"]
Event Types
Icon : "★: LTASM" or "★: STASM"Source : nse_asm_list.jsonTrigger : Stock is in Long-Term or Short-Term Additional Surveillance Measure
Icon : "📊: Results Recently Out"Source : company_filings/ (checks for “Quarterly Results” filing in last 7 days)Trigger : Quarterly results released within 7 days
Icon : "🔑: Insider Trading"Source : company_filings/ (checks for “Reg 7(2)” or “Form C” in last 15 days)Trigger : Insider trading disclosure filed within 15 days
Icon : "📦: Block Deal"Source : bulk_block_deals.json (checks for deal in last 7 days)Trigger : Bulk or block deal executed within 7 days
Icon : "#: +/- Revision"Source : incremental_price_bands.jsonTrigger : Price band change detected (e.g., 20% → 10%)
Icons :
"⏰: Results (DD-Mon)" - Upcoming quarterly results
"💸: Dividend (DD-Mon)" - Upcoming dividend
"🎁: Bonus (DD-Mon)" - Upcoming bonus issue
"✂️: Split (DD-Mon)" - Upcoming stock split
"📈: Rights (DD-Mon)" - Upcoming rights issue
Source : upcoming_corporate_actions.jsonTrigger Windows :
Results: Within 14 days
Other actions: Within 30 days
13. Recent Announcements Top 5 most recent regulatory filings. Field Type Source Example Recent Announcements Array[Object] company_filings/{SYMBOL}_filings.json (sorted by date, top 5)See below
Object Structure :{
"Date" : "2024-01-15" ,
"Headline" : "Outcome of Board Meeting - Quarterly Results" ,
"URL" : "https://www.bseindia.com/xml-data/corpfiling/..."
}
14. News Feed Top 5 most recent news items with sentiment. Field Type Source Example News Feed Array[Object] market_news/{SYMBOL}_news.json (sorted by date, top 5)See below
Object Structure :{
"Title" : "Reliance announces new green energy initiative" ,
"Sentiment" : "positive" , // "positive" | "negative" | "neutral"
"Date" : "2024-03-02"
}
Complete Field List (Alphabetical)
All 86 Fields (Click to Expand)
1 Day Returns(%)
1 Month Returns(%)
1 Week Returns(%)
1 Year Returns(%)
3 Month Returns(%)
5 Days MA ADR(%)
6 Month Returns(%)
14 Days MA ADR(%)
20 Days MA ADR(%)
30 Days Average Rupee Volume(Cr.)
30 Days MA ADR(%)
200 Days EMA Volume
% from 52W High
% from 52W High 200 Days EMA Volume
% from 52W Low
% from ATH
ATH
Basic Industry
Circuit Limit
D/E
Daily Rupee Turnover 100(Cr.)
Daily Rupee Turnover 20(Cr.)
Daily Rupee Turnover 50(Cr.)
Day Range(%)
DII % change QoQ
EMA Status
EPS 2 Quarters Back
EPS 2 Years Back
EPS 3 Quarters Back
EPS Last Year
EPS Last Year Quarter
EPS Latest Quarter
EPS Previous Quarter
Event Markers
FII % change QoQ
Float Shares(Cr.)
FNO Flag
Forward P/E
Free Float(%)
Gap Up %
Historical P/E 5
Index
Latest Quarter
Listing Date
Lot Size
Market Cap(Cr.)
Max Returns since Earnings(%)
Name
Net Profit 2 Quarters Back
Net Profit 3 Quarters Back
Net Profit Last Year Quarter
Net Profit Latest Quarter
Net Profit Previous Quarter
News Feed
Next Expiry
OPM 2 Quarters Back
OPM 3 Quarters Back
OPM Last Year Quarter
OPM Latest Quarter
OPM Previous Quarter
OPM TTM(%)
P/E
PEG
Pivot Point
QoQ % EPS Latest
QoQ % Net Profit Latest
QoQ % OPM Latest
QoQ % Sales Latest
Quarterly Results Date
Recent Announcements
Returns since Earnings(%)
ROCE(%)
ROE(%)
RSI (14)
RVOL
Sales 2 Quarters Back
Sales 3 Quarters Back
Sales Growth 5 Years(%)
Sales Last Year Quarter
Sales Latest Quarter
Sales Previous Quarter
Sector
SMA Status
Stock Price(₹)
Symbol
Technical Sentiment
YoY % EPS Latest
YoY % Net Profit Latest
YoY % OPM Latest
YoY % Sales Latest
Field Dependencies by Phase
If FETCH_OHLCV = False , 15 fields from Phase 4.1 (Advanced Metrics) and 3 fields from Phase 4.2 (Earnings Performance) will be zero or empty, resulting in 68 meaningful fields instead of 86.
Usage Examples
Load & Explore
Filter by Sector
Find Event-Driven Opportunities
Momentum Screening
import json
import gzip
# Load the compressed file
with gzip.open( 'all_stocks_fundamental_analysis.json.gz' , 'rt' ) as f:
stocks = json.load(f)
print ( f "Total stocks: { len (stocks) } " )
print ( f "Fields per stock: { len (stocks[ 0 ]) } " )
# Find stocks with high RVOL
high_rvol = [s for s in stocks if s.get( 'RVOL' , 0 ) > 2.0 ]
print ( f "Stocks with RVOL > 2.0: { len (high_rvol) } " )
Next Steps
Pipeline Architecture Understand how these fields are generated
Data Flow Trace data transformations across phases
Quick Start Run your first pipeline
Field Reference Complete reference of all 86 fields
Advanced Usage Learn advanced filtering and analysis techniques